<%@ page import="org.apache.commons.fileupload.FileItem" %>
    <%@ page import="java.util.List" %>
    <%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
    <%@ page import="org.apache.commons.fileupload.servlet.ServletFileUpload" %>
    <%@ page import="org.apache.commons.io.FilenameUtils" %>
    <%@ page import="java.io.File" %>
    
    
    <%@ page import="java.awt.image.BufferedImage" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.imageio.ImageIO" %>
    <%@ page import="org.apache.commons.fileupload.FileItem" %>
    <%@ page import="org.apache.commons.fileupload.FileUploadException" %>
    <%@ page import="org.imgscalr.Scalr" %>
    <%@ page import="net.sf.json.JSONArray" %>
    <%@ page import="net.sf.json.JSONObject" %>
    <%@ page contentType="text/html;charset=GB2312" language="java"%>


    <%

if (request.getParameter("sid") != null && !request.getParameter("sid").isEmpty()) {
    
    String syscode = request.getParameter("sid");
    String folder=Integer.toString(Math.round(Float.valueOf(syscode)/1000)*1000);
    
     String	clientPath = "papers/" +folder+"/"+ syscode+".jpg";     
	File file = new File(application.getRealPath(clientPath));

    PrintWriter writer = response.getWriter();
    
    if (1==1 && file.exists()) {
	writer.write("isthere");

    } else {
	writer.write("isnotthere");

    }
    writer.write(clientPath);


} else {
    PrintWriter writer = response.getWriter();
    writer.write("call without parameter sid");
}



 %>

